home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / sviluppo / svilupp2 / amphn192.lha / src / AmiPhoneMsg.h < prev    next >
C/C++ Source or Header  |  1996-11-16  |  2KB  |  57 lines

  1.  
  2. #ifndef AMIPHONEMSG
  3. #define AMIPHONEMSG
  4.  
  5. #include <exec/ports.h>
  6.  
  7. /* This header is to be included in both AmiPhone and AmiPhoned,
  8.    as this is the packet I'll use to communicate between them. */
  9.    
  10. struct AmiPhoneInfo {
  11.     struct Message PhoneMsg;/* Header */
  12.     UBYTE ubCurrComp;    /* sample width we're receiving at */
  13.     UBYTE ubControl;    /* Control byte--not currently used */
  14.     ULONG ulLastPacketSize;    /* size of last packet-note these are not TCP packets! */
  15.     BOOL  BErrorR;        /* Have we had any receive trouble? */
  16.     int   nPri;        /* AmiPhone can tell us to change priority here */
  17.     struct Task * daemonTask;  /* Pointer to us */
  18.     BOOL  BWantWindowOpen;  /* Used by AmiPhone to trigger AmiPhoned's window open/close */
  19.     BOOL  BWindowIsOpen;    /* Used by AmiPhoned to show current status */
  20. };
  21.  
  22. #define AMIPHONE_PORT_NAME "AmiPhone_Rend"
  23. #define RECEIVE_BUFFER_SIZE 3000
  24.  
  25. #define MSG_CONTROL_INVALID    0x00    /* should never be used */
  26. #define MSG_CONTROL_HI        0x01    /* "I'm here!" */
  27. #define MSG_CONTROL_BYE        0x02    /* "I'm leaving!" */
  28.  
  29. /* Below is the message structure used by AmiPhone to communicate with
  30.    its graphics subtask.  */
  31.  
  32. #define MSG_CONTROL_DOGRAPH    0x04    /* "Draw the bandwidth meter, etc." */
  33. #define MSG_CONTROL_DOANIM    0x08    /* "Draw the microphone icon" */
  34.  
  35. #define MSG_CONTROL_IMLEAVING    0x10    /* another "I'm leaving!" */
  36.  
  37. #define MSG_CONTROL_RELEASE     0x20    /* let go of the parallel port! */
  38.  
  39. #define MSG_CONTROL_UPDATE    0x40    /* "Check the shared data!" */
  40. #define MSG_CONTROL_DOTITLE     0x80    /* "Update the title bar" */
  41.  
  42. #define GRAPHICSTASKNAME  "AmiPhone Graphics Daemon"
  43. #define GRAPHICSPORTNAME  "AmiPhone Graphics Port"
  44.  
  45. struct AmiPhoneGraphicsInfo {
  46.     struct Message GraphMessage;    /* header */
  47.     UBYTE ubCommand;        /* What to do */
  48.     int   nImageTop;        /* tell which frame of the Mic anim to draw */
  49.     UBYTE ubCurrLocalComp;        /* Current local compression mode */
  50.     UBYTE ubCurrRemoteComp;        /* Current remote compression mode */
  51.     int   nBarHeightS;        /* Height of the send graph bar */
  52.     BOOL  BErrorS;            /* Have we had any send errors? */
  53.     int   nBarHeightR;        /* Height of the receive graph bar */
  54.     BOOL  BErrorR;            /* Have we had any receive errors? */
  55. };
  56.  
  57. #endif